# a = 11
# print(a)
# a = 'ABC'
# print(a)
# print(10/3)
# print(10%3.0)
# print(9/3)
# print('Hello,%s'%'world')
# print('%2d-%02d'%(3,1))
# print('growth rate: %d %%' % 7)

arr = ['A','B','C']
# 访问元素
# 从前往后访问
print(arr[0]+","+arr[1]+","+arr[2]) # A,B,C
# 从后往前访问
print(arr[-1]+","+arr[-2]+","+arr[-3])# C,B,A

# 尾加
arr.append('D')
print(arr)
# ['A', 'B', 'C', 'D']

# 指定位置插入
arr.insert(1,'insert')
print(arr) # ['A', 'insert', 'B', 'C', 'D']

# 删除末尾元素
arr.pop()
print(arr) # ['A', 'insert', 'B', 'C']

# 替换元素
arr[1] = 'replace'
print(arr) # ['A', 'replace', 'B', 'C']

# 列表长度
print(len(arr)) # 4

list1 = []
print(len(list1)) # 0